package com.zbkj.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zbkj.common.model.brand.Brand;
import com.zbkj.common.request.BrandNameSearchRequest;
import com.zbkj.common.request.BrandSearchRequest;
import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.request.brand.*;
import com.zbkj.common.response.*;

import java.util.List;

/**
 * BrandService 接口
 * +----------------------------------------------------------------------
 */
public interface BrandService extends IService<Brand> {
    /**
     * 分页列表
     * @param searchRequest 搜索条件
     * @param pageParamRequest 分页参数
     * @return PageInfo<BrandPageResponse>
     */
    PageInfo <BrandPageResponse> getAdminPage(BrandRequest searchRequest, PageParamRequest pageParamRequest);

    /**
     * 添加
     * @param request 新增对象
     * @return Boolean
     */
    boolean add(BrandAddRequest request);

    /**
     * 编辑
     * @param request 编辑对象
     * @return Boolean
     */
    boolean edit(BrandUpdateRequest request);

    /**
     * 获取品牌详情
     *
     * @param id 商户ID
     * @return Merchant
     */
    Brand getByIdException(Integer id);

    /**
     * 修改手机号
     * @param request request
     * @return Boolean
     */
    boolean updatePhone(BrandUpdatePhoneRequest request);

    /**
     * 重置密码
     * @param id 品牌id
     * @return Boolean
     */
    boolean resetPassword(Integer id);

    BrandDetailResponse getPlatformDetail(Integer id);

    boolean close(Integer id);

    boolean open(Integer id);

    BrandHeaderNumResponse getListHeaderNum(BrandRequest searchRequest);


    PageInfo <BrandLinkResponse> brandLink(BrandLink brandLink, PageParamRequest pageParamRequest);

    PageInfo<BrandResponse> getAdminListBrand(BrandSearchRequest request, PageParamRequest pageParamRequest);
    PageInfo<BrandResponse> getSelectedBrandListBrand(BrandSearchRequest searchRequest, PageParamRequest pageParamRequest);

    List<Integer> getEnableBrandList();

    /**
     * 根据推广链接获取品牌商名称
     * @param request 请求参数
     * @return
     */
    BrandNameResponse getName(BrandNameSearchRequest request);

    boolean updatePhonePlarform(BrandUpdatePhoneRequest request);

    List<Brand> getAllEnableBrandList();

    /**
     * 刷新品牌商缓存
     */
    void cacheBrandInfo();

    Integer getBrandId(String url);

    String getNameById(Integer brandId);

    List<Integer> getIdsByName(String name);
}
